<%@page import="board.BoardVo"%>
<%@page import="board.Board"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<link rel="stylesheet" type="text/css" href='./board/board.css'>
<script src='./board/board.js'></script>

</head>
<body>
<jsp:useBean id="boardVo" class="board.BoardVo"/>
<jsp:setProperty property="*" name="boardVo"/>
<%
Board board = new Board();
board.setVo(boardVo);
BoardVo bv = board.view();
String part = (String)session.getAttribute("part");
%>
<!-- title -->
<div id='bb_title'><%=part%> - 수정</div><br/>
<!-- end title -->

<form id='brd_out' name='frm_modify' method='post' enctype="multipart/form-data">


<div id='brd_line'>
	<div id='brd_left'>작성자</div>
	<div id='brd_right'><%=bv.getMid()%></div>
</div>
<div id='brd_line'>
	<div id='brd_left'>제목</div>
	<div id='brd_right'><input style="width: 540px;"type="text" name='subject' value="<%=bv.getSubject()%>"></div>
</div>
<div id='brd_line'>
	<div id='brd_left'>파일명</div>
	<div id='brd_right'>
		<%if(bv.getFilename().equals("NoFile") || boardVo.getFileDelFlag().equals("del")) { %>
			<input type='file' name='newfilename'>
		<%}else { %>
			<%=bv.getFilename()%><input type="button" value="삭제" onclick="fileDel('del',<%=bv.getSerial()%>)">
		<%} %>
	</div>
</div>
<div id='brd_line'>
	<div id='brd_left'>비밀번호</div>
	<div id='brd_right'><input type="password" name='pwd'></div>
</div>
<div id='brd_line'>
	<div id='brd_all'>내용</div>
</div>
<div id='brd_line2'>
	<textarea rows="10" cols="100" name='content'><%=bv.getContent()%></textarea>
</div>
<div id='brd_line'>
	<input type='button' value='수정' id="brd_btnModify">
	<input type='button' value='목록' id="brd_btnList">
	
	<input type="hidden" name='filename' value="<%=bv.getFilename()%>">
	<input type="hidden" name='serial' value="<%=bv.getSerial()%>">
	<input type="hidden" name='fileDelFlag' value="<%=boardVo.getFileDelFlag()%>">
	
</div>
</form>
</body>
</html>